package com.elong.businesstravel.modules.home.adapter;

import com.android.support.jhf.debug.DebugLog;
import com.elong.businesstravel.modules.home.hotel.HotelFragment;
import com.elong.businesstravel.modules.home.ticket.TrainTicketFragment;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
/**
 * 切换酒店和火车票
 * @author lenovo
 *
 */
public class HomePagerAdapter extends FragmentPagerAdapter {
	
	public HomePagerAdapter(FragmentManager fm) {
		super(fm);
	}

	@Override
	public Fragment getItem(int arg0) {
		if(0 == arg0){
			return new HotelFragment();
		}else if (1 == arg0) {
			return new TrainTicketFragment();
		}
		return null;
	}

	@Override
	public int getCount() {
		return 2;
	}

}
